<include file="Index/header" />
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> {$title}</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a class="button border-main icon-plus-square-o" href="{:U('Role/role_add')}"> 角色添加</a> </li>
        <li>
          <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" />
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
      </ul>
    </div>
      </div>
      </form>
      <form action="" method="post" name="jiao">
      <div class="Box">
          <foreach name="role" item="vo">
              <if condition="$vo['eName'] eq super_admin">
                  <div class="superBox box">
                      <h3 class="sy1">{$vo['role_name']}</h3>
                      <div class="content">
                          <h2 style="color: red">超级管理员拥有所有的权限</h2>
                      </div>
                  </div>
                  <else />
                  <div class="ordinaryBox box">
                      <h3 class="sy1">{$vo['role_name']}</h3>
                      <div class="content">
                          <ul>
                              <foreach name="node" item="v" key="k">
                                  <if condition="$k eq 10"><br/></if>
                                  <if condition="is_array($vo['r']) eq true">
                                      <li><input type="checkbox" name="node_{$vo['id']}[]" value="{$v['id']}" <if condition="in_array($v['id'],$vo['r']) eq true">checked=checked</if>/><span>{$v['node_name']}</span></li>
                                      <else />
                                      <li><input type="checkbox" name="node_id[]" value="{$v['id']}"/><span>{$v['node_name']}</span></li>
                                  </if>
                              </foreach>
                          </ul>
                      </div>
                  </div>
              </if>
          </foreach>
      </div>
  </div>
          <br><br>
          <center>
          <div class="field">
              <div class="button bg-main icon-check-square-o tijiao" style="cursor:pointer;"> 提交</div>
          </div></center>
</form>
<script type="text/javascript">

//搜索
function changesearch(){	
		
}

//单个删除
function del(id){
	if(confirm("您确定要删除吗?")){
        window.location.href="/Admin/Role/del/roleId/"+id;
	}
}

function edit(id){
    window.location.href="/Admin/Role/edit/roleId/"+id;
}
    $(".tijiao").click(function(){
        $("form[name='jiao']").submit();
    });
</script>
</body>
</html>